package com.jinzhi.jzweb.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.common.base.BaseDao;
import com.jinzhi.jzapi.examination.pojo.ExaminationsPercentVo;
import com.jinzhi.jzapi.examination.pojo.ExaminationsVo;
import com.jinzhi.jzweb.domain.ExaminationBatchDO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 
 * <pre>
 * 考试批次
 * </pre>
 * <small> 2020-02-24 21:00:12 | lance</small>
 */
public interface ExaminationBatchDao extends BaseDao<ExaminationBatchDO> {
    List<Map<Object,Object>> selByAll();

    ExaminationsVo selExaminations();
    
    List<ExaminationBatchDO> selExamNowList();
    
    List<ExaminationsVo> selListExaminationsNow();

    //获取当天所有的竞赛考试批次
    List<ExaminationsVo> selListExaminationsNowJs();

    //查询测试批次
    List<ExaminationsVo> selListExaminationsNowCeshi();

    @Select("select cbatch_id from jz_examination_batch where id = #{id}")
    Long findByCbatchId(String id);

    List<Map<Object,Object>> selByNameCbatchId(Page<Map<Object,Object>> page, @Param("name") String name,@Param("cbatchId") Long cbatchId);

    List<Map<Object,Object>> selByNameNoCbatchId(Page<Map<Object,Object>> page, @Param("name") String name);


    List<Map<Object,Object>> selByNameCbatchId2(Page<Map<Object,Object>> page, @Param("name") String name,@Param("cbatchId") Long cbatchId);
    List<Map<Object,Object>> selByNameNoCbatchId2(Page<Map<Object,Object>> page, @Param("name") String name);


    List<ExaminationBatchDO> selListExamBatch(Map map);

    //查询下拉框对应的考试批次
    List<Map<Object,Object>> selBatchTimeAll(@Param("type") String type,@Param("name") String name,@Param("all") String all);

    //查询每一批次学生人数、学生理论成绩大于0人数、学生理论成绩大于0占比率
    List<ExaminationsPercentVo> selecltPercentList(@Param("list") List list);

    //查询每一批次学生人数、学生实操成绩大于0人数、学生实操成绩大于0占比率
    List<ExaminationsPercentVo> selecltPercentList1(@Param("list") List list);

    //获取当天所有的非学生考试批次
    List<ExaminationsVo> selListExaminationsTeachers();

    //获取当天所有的筛选考试批次
    List<ExaminationsVo> selListExaminationsScreen();
}
